package clause

import "strings"

type ClauseInterface interface {
	BuilderSql(builder *Builder)
}

type Builder struct {
	s        strings.Builder // 预处理SQL
	bindings []any           // 参数绑定
}

func (builder *Builder) WriteString(s string, bindings ...any) {
	builder.s.WriteString(s)
	builder.bindings = append(builder.bindings, bindings...)
}

func (b *Builder) GetSQL() string {
	return b.s.String()
}

func (b *Builder) GetBindings() []any {
	return b.bindings
}
